package com.cykj.order.domain.dto;

import com.cykj.order.domain.enums.CartOperationType;
import javax.validation.constraints.NotNull;

/**
 * 购物车商品操作DTO
 * 
 * @author cykj
 * @date 2025-01-20
 */
public class CartItemOperationDto {
    
    /** 购物车ID */
    @NotNull(message = "购物车ID不能为空")
    private Integer cartId;
    
    /** 商品ID */
    @NotNull(message = "商品ID不能为空")
    private Integer productId;
    
    /** 操作类型：ADD-增加，REDUCE-减少，DELETE-删除 */
    @NotNull(message = "操作类型不能为空")
    private CartOperationType operationType;

    public Integer getCartId() {
        return cartId;
    }

    public void setCartId(Integer cartId) {
        this.cartId = cartId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public CartOperationType getOperationType() {
        return operationType;
    }

    public void setOperationType(CartOperationType operationType) {
        this.operationType = operationType;
    }

    @Override
    public String toString() {
        return "CartItemOperationDto{" +
                "cartId=" + cartId +
                ", productId=" + productId +
                ", operationType=" + operationType +
                '}';
    }
}
